dgb: per-connection Stratum coinbase assembler + coinb1/coinb2 split SSOT - #327
Merged
Conversation
…SSOT Add coin/connection_coinbase.hpp: build_connection_coinbase_parts() builds the prospective next-share gentx for one Stratum connection via the assemble_gentx_coinbase SSOT, then splits it into the Stratum coinb1/coinb2 pair around the OP_RETURN 8-byte extranonce slot so that coinb1 || extranonce1(4) || extranonce2(4) || coinb2 reconstructs the exact gentx bytes the submit path validates. KAT (4) pins the assembled bytes byte-identical to the canonical frstrtr/p2pool-dgb-scrypt oracle wire (same NOSEG vector as the gentx assembler KAT) and the split invariant. Pure / no tracker dependency. Fenced to the DGB tree; runtime byte-unchanged (new file + test only).
frstrtr
added a commit
that referenced
this pull request
Jun 22, 2026
dgb(phase-b): wire per-connection coinbase payout split to PPLNS SSOT (#327-gated follow-on)
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
dgb: per-connection Stratum coinbase assembler + coinb1/coinb2 split SSOT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase B pillar (per the integrator hand-off after #322): implement the per-connection coinbase assembly.
What
src/impl/dgb/coin/connection_coinbase.hpp:build_connection_coinbase_parts()assembles the prospective next-share gentx for one Stratum connection through the existingassemble_gentx_coinbaseSSOT, then splits it into the Stratumcoinb1/coinb2pair around the OP_RETURN 8-byte extranonce slot.coinb1 || extranonce1(4) || extranonce2(4) || coinb2 == full gentx bytes— the reconstructionmining_submitrelies on.build_ref_op_return(): canonical6a28 || ref_hash(32) || last_txout_nonce(8 LE)commitment, byte-identical to the verification SSOT in share_check.hpp.Conformance
KAT (4/4 local) pins the assembled bytes byte-identical to the canonical
frstrtr/p2pool-dgb-scryptoracle wire (reusing the same NOSEG ground-truth vector as the gentx assembler KAT) plus the split invariant. Pure / no tracker dependency, so the vector is the oracle serializer output, not self-generated.Scope / safety
coin/+test/) + the build.yml--targetallowlist (both arms). No shared / bitcoin_family / core / ltc / doge touch.DGBWorkSource::build_connection_coinbase()still returns the empty stub. The live PPLNS payout-map + ref_hash tracker-seam wiring into the work source is the next stacked slice.